package com.arpa.oms.domain.entity;

import com.arpa.oms.domain.enums.PayableAndReceivableStatusEnum;
import com.arpa.wms.domain.entity.BasicEntity;
import com.baomidou.mybatisplus.annotation.TableField;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.List;

/**
 * <p>
 * OMS付款单
 * </p>
 *
 * @author LEO
 * @since 2020-12-04
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@ApiModel(value="OmsPayable对象", description="OMS付款单")
public class OmsPayable extends BasicEntity {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "付款单号")
    @TableField("code")
    private String code;

    @ApiModelProperty(value = "付款人标识")
    @TableField("shipment_code")
    private String shipmentCode;

    @ApiModelProperty(value = "付款人名称")
    @TableField("shipment_name")
    private String shipmentName;

    @ApiModelProperty(value = "收款人标识")
    @TableField("supplier_code")
    private String supplierCode;

    @ApiModelProperty(value = "收款人姓名")
    @TableField("supplier_name")
    private String supplierName;

    @ApiModelProperty(value = "金额")
    @TableField("amount_money")
    private BigDecimal amountMoney;

    @ApiModelProperty(value = "状态：NEWS（新增）、PENDING（待审核）、PASS（审核通过）、NO_PASS（审核不通过）")
    @TableField("status")
    private PayableAndReceivableStatusEnum status;

    @ApiModelProperty(value = "备注")
    @TableField("remarks")
    private String remarks;

    @ApiModelProperty(value = "审核意见")
    @TableField("verify_opinion")
    private String verifyOpinion;

    @ApiModelProperty(value = "审核时间")
    @TableField("gmt_verify")
    private LocalDateTime gmtVerify;

    @ApiModelProperty(value = "审核人")
    @TableField("verify_by")
    private String verifyBy;

    @ApiModelProperty(value = "审核人姓名")
    @TableField("verify_name")
    private String verifyName;


    @ApiModelProperty(value = "结算明细")
    @TableField(exist = false)
    private List<OmsPayableItem> omsPayableItems;

    @ApiModelProperty(value = "减免金额")
    @TableField("amount_reduce")
    private BigDecimal amountReduce;

    @ApiModelProperty(value = "收款金额")
    @TableField("amount_collected")
    private BigDecimal amountCollected;

}
